package cn.luischen.utils;

import java.awt.Image;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.Normalizer;
import java.util.Arrays;
import java.util.Date;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.imageio.ImageIO;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.sql.DataSource;
import org.apache.commons.lang3.StringUtils;
import org.commonmark.Extension;
import org.commonmark.ext.gfm.tables.TablesExtension;
import org.commonmark.node.Node;
import org.commonmark.parser.Parser;
import org.commonmark.renderer.html.HtmlRenderer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import cn.luischen.constant.WebConst;
import cn.luischen.controller.admin.AttAchController;
import cn.luischen.exception.BusinessException;
import cn.luischen.model.UserDomain;

import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.rules.ExpectedException;
import org.junit.Test;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;
import java.lang.reflect.Method;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.ParserConfig;
import java.util.Map;
import java.util.List;
import com.unitspirit.runtime.*;

/**
<<<<<<< HEAD:src/unittest/java/cn/luischen/utils/TaleUtils_getUplodFilePath_WGTest.java
 * The class <code>Job_WGTest</code> contains tests for the class <code>{@link Job}</code>.
*
* @generatedBy UnitSpirit CreateTemplateTestFile4
* @version 1.0.9.11 
*/
@PowerMockIgnore({ "javax.management.*" })
public class TaleUtils_getUplodFilePath_WGTest {
=======
 * The class contains tests for the class cn.luischen.utils.TaleUtils.
 *
 * @generatedBy UnitSpirit CreateTemplateTestFile4
 * @version 1.0.9.11 
 */
@PowerMockIgnore({ "javax.management.*" })
@RunWith(PowerMockRunner.class)
@PrepareForTest({ cn.luischen.utils.TaleUtils.class })
public class TaleUtils_getCookieUid_WGTest {
>>>>>>> 3b028d6f1d2dd25e613c470e379df4ff28f4935e:src/unittest/java/cn/luischen/utils/TaleUtils_getCookieUid_WGTest.java
	@Rule
	public ExpectedException unitspirit_thrown = ExpectedException.none();

	/**
<<<<<<< HEAD:src/unittest/java/cn/luischen/utils/TaleUtils_getUplodFilePath_WGTest.java
	* 测试方法初始化.
	* 
	* @throws Exception 
	*         if the initialization fails for some reason 
	*  
	* @generatedBy UnitSpirit at 2021-09-07 17:52:15
	*/
=======
	 * 测试方法初始化.
	 * 
	 * @throws Exception 
	 *         if the initialization fails for some reason 
	 *  
	 * @generatedBy UnitSpirit at 2021-12-06 21:50:34
	 */
>>>>>>> 3b028d6f1d2dd25e613c470e379df4ff28f4935e:src/unittest/java/cn/luischen/utils/TaleUtils_getCookieUid_WGTest.java
	@org.junit.Before
	public void setUp() throws Exception {
		try {
			GlobalUnitInit.init();
			MockitoAnnotations.initMocks(this);
			ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	/**
<<<<<<< HEAD:src/unittest/java/cn/luischen/utils/TaleUtils_getUplodFilePath_WGTest.java
	* @date 2021-09-07 17:52:17
	* @see cn.luischen.utils.TaleUtils#getUplodFilePath
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_getUplodFilePath_0220_170538_904_0_01() throws Throwable {
		//返回值定义 
		String result_expected = "\"F:\\gitee\\my-site/\"";

		String unitspirit_result = cn.luischen.utils.TaleUtils.getUplodFilePath();
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:17
	* @see cn.luischen.utils.TaleUtils#getUplodFilePath
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_getUplodFilePath_0220_170538_904_0_02() throws Throwable {
		//返回值定义 
		String result_expected = "\"F:\\gitee\\my-site/\"";

		String unitspirit_result = cn.luischen.utils.TaleUtils.getUplodFilePath();
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:17
	* @see cn.luischen.utils.TaleUtils#getUplodFilePath
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_getUplodFilePath_20210222_200452_632_0_01() throws Throwable {
		//返回值定义 
		String result_expected = "\"F:\\gitee\\my-site/\"";

		String unitspirit_result = cn.luischen.utils.TaleUtils.getUplodFilePath();
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:17
	* @see cn.luischen.utils.TaleUtils#getUplodFilePath
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_getUplodFilePath_20210222_200452_632_0_02() throws Throwable {
		//返回值定义 
		String result_expected = "\"F:\\gitee\\my-site/\"";

		String unitspirit_result = cn.luischen.utils.TaleUtils.getUplodFilePath();
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
=======
	 * @date 2021-12-06 21:50:34
	 * @see cn.luischen.utils.TaleUtils#getCookieUid
	 * @category auto generate by UnitSpirit  
	 */
	@Test
	public void test_getCookieUid_20211109_110223_629_1_01() throws Throwable {
		PowerMockito.spy(cn.luischen.utils.TaleUtils.class);
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		//返回值定义 
		String result_expected = null;

		javax.servlet.http.Cookie mock_result_Cookie1 = null;
		PowerMockito.doReturn(mock_result_Cookie1).when(
				cn.luischen.utils.TaleUtils.class, "cookieRaw", anyString(),
				Mockito.any(javax.servlet.http.HttpServletRequest.class));

		Integer unitspirit_result = cn.luischen.utils.TaleUtils
				.getCookieUid(HttpServletRequest_p_0);
		assertNull(unitspirit_result);
	}

	/**
	 * @date 2021-12-06 21:50:34
	 * @see cn.luischen.utils.TaleUtils#getCookieUid
	 * @category auto generate by UnitSpirit  
	 */
	@Test
	public void test_getCookieUid_20211109_110223_629_1_02() throws Throwable {
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		//返回值定义 
		String result_expected = null;

		Integer unitspirit_result = cn.luischen.utils.TaleUtils
				.getCookieUid(HttpServletRequest_p_0);
		assertNull(unitspirit_result);
>>>>>>> 3b028d6f1d2dd25e613c470e379df4ff28f4935e:src/unittest/java/cn/luischen/utils/TaleUtils_getCookieUid_WGTest.java
	}
}
